/* vim:ft=objc:
 * $Id: PreferencesController.h 114 2005-05-12 05:15:40Z bmoore $
 *
 * Copyright (c) 2004, 2005  Branden J. Moore.
 *
 * This file is part of MacBiff, and is free software; you can redistribute
 * it and/or modify it under the terms of the GNU General Public License
 * version 2 as published by the Free Software Foundation.
 *
 * MacBiff is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with MacBiff; if not, write to the Free Software Foundation, Inc., 59
 * Temple Place, Suite 330, Boston, MA  02111-1307 USA.
 *
 */

#import <Cocoa/Cocoa.h>

#define PREFS_REVISION 2

@interface PreferencesController : NSObject
{
	NSRecursiveLock *prefsLock;
	NSUserDefaults *myPrefs;

	NSMutableDictionary *displayDict;
	NSMutableDictionary *miscDict;
	NSMutableDictionary *accountsDict;
	NSMutableDictionary *actionsDict;

}

- (void) commit;

- (NSMutableDictionary*) display;
- (void) commitDisplay;

- (NSMutableDictionary*) misc;
- (void) commitMisc;

- (NSArray*) accountList;
- (NSMutableDictionary*) account: (NSString*) account;
- (void) commitAccounts;
- (void) removeAccount: (NSString*) account;
- (void) renameAccount: (NSString*) a1 to: (NSString*) a2;
- (void) addAccount: (NSString*) account withType: (NSString*) type;

- (NSMutableDictionary*) action: (NSString*) action;
- (void) commitActions;

- (NSArray*) defaultPreCheckActions;
- (void) setDefaultPreCheckActions: (NSArray*) arr;
- (NSArray*) defaultPostCheckActions;
- (void) setDefaultPostCheckActions: (NSArray*) arr;

@end

extern PreferencesController *prefs;
